<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:56:"D:\demo\public/../application/admin\view\menu\index.html";i:1538054176;s:47:"D:\demo\application\admin\view\common\head.html";i:1538054162;s:49:"D:\demo\application\admin\view\common\footer.html";i:1515220428;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Doyi管理平台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/admin/layui/css/layui.css">
    <link rel="stylesheet" href="/static/admin/build/css/app.css" media="all">
</head>
<style>
    .hidden{
        display: none;
    }

</style>
<body class="layui-layout-body kit-layout-admin">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header" style="height: 3.76rem">
        <div class="layui-logo" style="line-height: 3.76rem">Doyi管理平台</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="">控制台</a></li>
            <li class="layui-nav-item"><a href="">商品管理</a></li>
            <li class="layui-nav-item"><a href="">用户</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">邮件管理</a></dd>
                    <dd><a href="">消息管理</a></dd>
                    <dd><a href="">授权管理</a></dd>
                </dl>
            </li>
        </ul>
        <!--<ul class="layui-nav layui-layout-right">-->
            <!--<li class="layui-nav-item">-->
                <!--<a href="javascript:;">-->
                <!--</a>-->
                <!--<dl class="layui-nav-child">-->
                    <!--<dd><a href="">基本资料</a></dd>-->
                    <!--<dd><a href="">安全设置</a></dd>-->
                <!--</dl>-->
            <!--</li>-->
            <!--<li class="layui-nav-item"><a href="<?php echo url('Login/loginOut'); ?>">退了</a></li>-->
        <!--</ul>-->
        <ul class="layui-nav layui-layout-right" lay-filter="kitNavbar" kit-navbar>
            <!--<li class="layui-nav-item">-->
                <!--<a href="javascript:;"  data-url="<?php echo url('Order/orderList?order_status=20'); ?>" data-icon="fa-user" data-title="待发货订单" kit-target data-id='101112'>待发货<span class="layui-badge delivery_number"><?php echo (isset($order['delivery_number']) && ($order['delivery_number'] !== '')?$order['delivery_number']:0); ?></span></a>-->
            <!--</li>-->
            <!--<li class="layui-nav-item">-->
                <!--<a href="javascript:;"  data-url="<?php echo url('Order/orderList40?status=0'); ?>" data-icon="fa-user" data-title="售后订单" kit-target data-id='101113'>售后订单<span class="layui-badge sales_number"><?php echo (isset($order['sales_number']) && ($order['sales_number'] !== '')?$order['sales_number']:0); ?></span></a>-->
            <!--</li>-->


<li class="layui-nav-item">
    <a href="javascript:;"  data-url="/admin/index" data-icon="fa-user" data-title="开始团建活动" kit-target data-id='101112'>待发团<span class="layui-badge delivery_number">1</span></a>
</li>
<li class="layui-nav-item">
    <a href="javascript:;"  data-url="/admin/index" data-icon="fa-user" data-title="员工活动意见" kit-target data-id='101113'>待审核<span class="layui-badge sales_number">1</span></a>
</li>
            <li class="layui-nav-item" >
                <a href="javascript:;">
                    <img src='<?php echo (isset($adminInfo['head_img']) && ($adminInfo['head_img'] !== '')?$adminInfo['head_img']:"http://t.cn/RCzsdCq"); ?>' class="layui-nav-img">
                    <?php echo (isset($adminInfo['login_number']) && ($adminInfo['login_number'] !== '')?$adminInfo['login_number']:"doyi"); ?>
                </a>
                <dl class="layui-nav-child" >
                    <dd>
                        <a href="javascript:;" data-url="<?php echo url('admin/adminInfo'); ?>" data-icon="fa-user" data-title="个人资料" kit-target data-id='101111'><i class="layui-icon">&#xe6af;</i><span> 个人资料</span></a>
                    </dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="<?php echo url('Login/loginOut'); ?>">退出</a></li>
        </ul>
    </div>
    <!--导航-->
    <div class="layui-side layui-bg-black kit-side" style="margin-top: 0.64rem">
        <div class="layui-side-scroll">
            <div class="kit-side-fold"><i class="fa fa-navicon layui-icon" style="color: #009688;" aria-hidden="true">&#xe65f;</i></div>
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="kitNavbar" kit-navbar>
                <li class="layui-nav-item layui-this">
                    <a href="javascript:;"  data-url="<?php echo url('Menu/main'); ?>" data-icon="fa-user" data-title="图表统计" kit-target data-id='1'><i class="layui-icon">&#xe68e;</i><span> Dashboard</span></a>
                </li>
                <!--<li class="layui-nav-item">-->
                    <!--<a class="" href="javascript:;"><i class="fa fa-plug layui-icon" aria-hidden="true">&#xe68e;</i><span> 基本元素</span></a>-->
                    <!--<dl class="layui-nav-child">-->
                        <!--<dd>-->
                            <!--<a href="javascript:;"  data-url="<?php echo url('Index/table'); ?>" data-icon="fa-user" data-title="表格" kit-target data-id='1'><i class="layui-icon">&#xe602;</i><span> 表格</span></a>-->
                        <!--</dd>-->
                        <!--<dd>-->
                            <!--<a href="javascript:;" data-url="<?php echo url('Index/from'); ?>" data-icon="fa-user" data-title="表单" kit-target data-id='2'><i class="fa fa-user layui-icon">&#xe602;</i><span> 表单</span></a>-->
                        <!--</dd>-->
                        <!--<dd>-->
                            <!--<a href="javascript:;" data-url="<?php echo url('Index/table'); ?>" data-icon="fa-user" data-title="DashBord" kit-target data-id='3'><i class="fa fa-user layui-icon">&#xe602;</i><span> DashBord</span></a>-->
                        <!--</dd>-->
                        <!--<dd>-->
                            <!--<a href="javascript:;" data-url="<?php echo url('Index/file'); ?>" data-icon="fa-user" data-title="文件上传" kit-target data-id='4'><i class="fa fa-user layui-icon">&#xe602;</i><span> 文件上传</span></a>-->
                        <!--</dd>-->
                    <!--</dl>-->
                <!--</li>-->
                <?php foreach($info as $menu): ?>
                <li class="layui-nav-item">
                    <a class="parentMenu" href="javascript:;"><i class="fa fa-plug layui-icon" aria-hidden="true"><?php echo $menu['icon']; ?></i><span> <?php echo $menu['menu_name']; ?></span></a>
                    <dl class="layui-nav-child">
                        <!--&#xe602;-->
                        <?php foreach($menu['action'] as $action): ?>
                        <dd>
                            <a href="javascript:;" data-url="<?php echo url($action['controller_name'].'/'.$action['action_name']); ?>" data-icon="fa-user" data-title="<?php echo $action['menu_name']; ?>" kit-target data-id='<?php echo $action['id']; ?>'><i class="layui-icon"><?php echo $action['icon']; ?></i><span> <?php echo $action['menu_name']; ?></span></a>
                        </dd>
                        <?php endforeach; ?>
                    </dl>
                </li>
                <?php endforeach; ?>
            </ul>
        </div>
    </div>
    <div class="layui-body" id="container" style="margin-top: 0.64rem">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">主体内容加载中,请稍等...</div>
    </div>
    <div class="layui-footer">
        <div class="layui-row">
            <div class="layui-col-md6" style="text-align: left">
                2018 © Power by <a href="http://www.baidu.com" target="_blank">Doyi</a>
            </div>
            <div class="layui-col-md6" style="text-align: right">
                Ver 1.0
            </div>
        </div>
    </div>
    <script src="/static/admin/layui/layui.js"></script>
<script src="/static/common/js/jquery.min.js"></script>
<script>
//    图片放大显示
    $('.select_img').on('click',function () {
        var img_url=$(this).data('content');
        layer.open({
            type: 1,
            title: false,
            closeBtn: 0,
            area: ['50%','80%'],
            skin: 'layui-layer-nobg', //没有背景色
            shadeClose: true,
            content: '<img src="'+img_url+'" />',
        });
    })
    //文件上传
    layui.use('upload', function(){
        var $ = layui.jquery
            ,upload = layui.upload;
        //多文件列表示例
        var demoListView = $('#demoList')
            ,uploadListIns = upload.render({
            elem: '#testList'
            ,url: '<?php echo url("Upload/file_images"); ?>'
            ,accept: 'file'
            ,multiple: true
            ,auto: false
            ,bindAction: '#testListAction'
            ,choose: function(obj){
                var files = obj.pushFile(); //将每次选择的文件追加到文件队列
                //读取本地文件
                obj.preview(function(index, file, result){
                    var tr = $(['<tr id="upload-'+ index +'">'
                        ,'<td>'+ file.name +'</td>'
                        ,'<td>'+ (file.size/1014).toFixed(1) +'kb</td>'
                        ,'<td>等待上传</td>'
                        ,'<td>'
                        ,'<button class="layui-btn layui-btn-mini demo-reload layui-hide">重传</button>'
                        ,'<button class="layui-btn layui-btn-mini layui-btn-danger demo-delete">删除</button>'
                        ,'</td>'
                        ,'</tr>'].join(''));

                    //单个重传
                    tr.find('.demo-reload').on('click', function(){
                        obj.upload(index, file);
                    });

                    //删除
                    tr.find('.demo-delete').on('click', function(){
                        delete files[index]; //删除对应的文件
                        tr.remove();
                    });

                    demoListView.append(tr);
                });
            }
            ,done: function(res, index, upload){
                if(res.code == 200){ //上传成功
                    var tr = demoListView.find('tr#upload-'+ index)
                        ,tds = tr.children();
                    tds.eq(2).html('<span style="color: #5FB878;">上传成功</span><input type="hidden" name="images['+index+']" value="'+res.data.src+'">');
                    tds.eq(3).html(''); //清空操作
                    delete files[index]; //删除文件队列已经上传成功的文件
                    return;
                }
                this.error(index, upload);
            }
            ,error: function(index, upload){
                var tr = demoListView.find('tr#upload-'+ index)
                    ,tds = tr.children();
                tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
                tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
            }
        });

        //普通图片上传 单图片上传
        var uploadInst = upload.render({
            elem: '#image'
            ,url: '<?php echo url("Upload/file_images"); ?>'
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#show_image').attr('src', result); //图片链接（base64）
                });
            }
            ,done: function(res){
                //如果上传失败
                if(res.code == 400){
                    return layer.msg('上传失败');
                }
                $('.value_image').val(res.data.src);
                //上传成功
            }
            ,error: function(){
                //演示失败状态，并实现重传
                var demoText = $('#demoText');
                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-mini demo-reload">重试</a>');
                demoText.find('.demo-reload').on('click', function(){
                    uploadInst.upload();
                });
            }
        });
    });
</script>
<script>
    $(function () {
        $('.layui-nav-item').on('click',function () {
            $(this).siblings().removeClass('layui-nav-itemed');
        })
    })
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;
    });
    var message;
    layui.config({
        base: '/static/admin/build/js/'
    }).use(['app'], function() {
        var app = layui.app,
            $ = layui.jquery,
            layer = layui.layer;
        //将message设置为全局以便子页面调用
        message = layui.message;
        //主入口
        app.set({
            url:'<?php echo url("Menu/table"); ?>',
            type: 'iframe'
        }).init();
    });


</script>
</body>
</html>

